﻿<%@ Page Language="C#" DynamicMasterPageFile="~masterurl/default.master" AutoEventWireup="true"  EnableEventValidation="false"
    Inherits="Nintex.Workflow.ServerControls.NintexLayoutsBase, Nintex.Workflow.ServerControls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=913f6bae0ca5ae12" %>

<%@ Register TagPrefix="Nintex" Namespace="Nintex.Workflow.ServerControls" Assembly="Nintex.Workflow.ServerControls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=913f6bae0ca5ae12" %>
<%@ Register TagPrefix="Nintex" TagName="ConfigurationPropertySection" src="~/_layouts/15/NintexWorkflow/ConfigurationPropertySection.ascx" %>
<%@ Register TagPrefix="Nintex" TagName="ConfigurationProperty" src="~/_layouts/15/NintexWorkflow/ConfigurationProperty.ascx" %>
<%@ Register TagPrefix="Nintex" TagName="DialogLoad" Src="~/_layouts/15/NintexWorkflow/DialogLoad.ascx" %>
<%@ Register TagPrefix="Nintex" TagName="DialogBody" Src="~/_layouts/15/NintexWorkflow/DialogBody.ascx" %>

<%@ Register TagPrefix="Nintex" TagName="SingleLineInput" Src="~/_layouts/15/NintexWorkflow/SingleLineInput.ascx" %>
<%@ Register TagPrefix="Nintex" TagName="PlainTextWebControl" Src="~/_layouts/15/NintexWorkflow/PlainTextWebControl.ascx" %>

<asp:Content ID="ContentHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
    <Nintex:DialogLoad runat="server" />

    <script type="text/javascript" language="javascript">
        function TPARetrieveConfig() {
            setRTEValue('<%=targetAssemblyProperty.ClientID%>', configXml.selectSingleNode("/NWActionConfig/Parameters/Parameter[@Name='TargetAssembly']/PrimitiveValue/@Value").text);
            setRTEValue('<%=targetTypeProperty.ClientID%>', configXml.selectSingleNode("/NWActionConfig/Parameters/Parameter[@Name='TargetType']/PrimitiveValue/@Value").text);
            setRTEValue('<%=inputParamProperty.ClientID%>', configXml.selectSingleNode("/NWActionConfig/Parameters/Parameter[@Name='InputParam']/PrimitiveValue/@Value").text);
            
        }

        function TPAWriteConfig() {

            configXml.selectSingleNode("/NWActionConfig/Parameters/Parameter[@Name='TargetAssembly']/PrimitiveValue/@Value").text = getRTEValue('<%=targetAssemblyProperty.ClientID%>');
            configXml.selectSingleNode("/NWActionConfig/Parameters/Parameter[@Name='TargetType']/PrimitiveValue/@Value").text = getRTEValue('<%=targetTypeProperty.ClientID%>');
            configXml.selectSingleNode("/NWActionConfig/Parameters/Parameter[@Name='InputParam']/PrimitiveValue/@Value").text = getRTEValue('<%=inputParamProperty.ClientID%>');


            return true;
        }

        onLoadFunctions[onLoadFunctions.length] = function () {
            dialogSectionsArray["<%= MainControls1.ClientID %>"] = true;
        };
    </script>
</asp:Content>

<asp:Content ID="ContentBody" ContentPlaceHolderID="PlaceHolderMain" runat="Server">

  <Nintex:ConfigurationPropertySection runat="server" Id="MainControls1">
              <TemplateRowsArea>

                <Nintex:ConfigurationProperty runat="server" FieldTitle="Assembly" RequiredField="True">
                   <TemplateControlArea>
                        <Nintex:SingleLineInput clearFieldOnInsert="true"  runat="server" id="targetAssemblyProperty"></Nintex:SingleLineInput>
                  </TemplateControlArea>
                </Nintex:ConfigurationProperty>

                 <Nintex:ConfigurationProperty runat="server" FieldTitle="Type" RequiredField="True">
                   <TemplateControlArea>
                        <Nintex:SingleLineInput clearFieldOnInsert="true"  runat="server" id="targetTypeProperty"></Nintex:SingleLineInput>
                  </TemplateControlArea>
                </Nintex:ConfigurationProperty>
                  
              <Nintex:ConfigurationProperty runat="server" FieldTitle="Input Param">
                   <TemplateControlArea>
                        <Nintex:SingleLineInput clearFieldOnInsert="true"  runat="server" id="inputParamProperty"></Nintex:SingleLineInput>
                  </TemplateControlArea>
                </Nintex:ConfigurationProperty>

              </TemplateRowsArea>
            </Nintex:ConfigurationPropertySection>

  <Nintex:DialogBody runat="server" id="DialogBody">
  </Nintex:DialogBody>
</asp:Content>
